<?php
/**
 * Created on 29-mag-2006
 * jaco_at_pixeldump
 * extracting mp3 sound events
 */
 
include("sample_utils.php");                       // provides some utils and using mk

$swfFN = "clong.swf";                              // file to extract sound

$si = new MKSwfInspector($swfFN);                 // the main decomposer class
$soundObj = $si->find_firstTagID(SOUND);           // find first sound data available
$soundTD = $soundObj->get_tagData();               // we already know there is sound data
                                                   // so skip error check, get tag data
$sound1 = new MKSoundContainer($soundTD);         // create specific sound object
$sound1->dump_soundData(SERVER_MKTMP);             // dump sound on file

$savedSoundFN = $sound1->get_soundFileName();      // file name is auto generated
                                                   // if you wish different file name,
                                                   // call set_soundFileName("yourfilename") first

$str = $savedSoundFN ." created in :<br />" .SERVER_MKTMP; // prepare to publish some response
echo show_content($str, basename(__FILE__));       // publish response
?>
